package com.dyg.service;

import java.util.List;
import com.dyg.model.Resource;

public interface ResourceService {

	public Resource insertResource(Resource resource);

	public void deleteResourceById(String resourceId);

	public Resource updateResource(Resource resource);

	public Resource findResourceById(String resourceId);

	public List<Resource> findResourceList();

	/**
	 * 查询指定用户id所拥有的权限
	 * @param userId
	 * @return
	 */
	public List<Resource> listAllResource(int userId);

	/**
	 * 查询角色拥有的资源集合
	 * @param id
	 * @return
	 */
	public List<Resource> listRoleResource(Integer id);

}
